Any quotient of two numbers P and Q can be represented as a continued fraction. A continued fraction representation of the quotient of P/Q has the following form:
      P    /    Q    =      a0    +          1              a1        +                  1                      a2            +                          1                              a3                +                                  1                                      a4                    +                    …                                                                                          The coefficients a1, a2, a3, etc., are known as partial quotients. The partial quotients of a continued fraction may be represented in list notation, as follows:P/Q=[a0, a1, a2, a3, a4 . . . a(k)] for k>4.
Mathematics for generating a continued fraction is presented below, with reference to an example provided in prior art literature. In the following example, P has a value of 3796 and Q has a value of 1387. In this example, when 3796 is divided by 1387, the result is3796=1387*2+1022,where 1022 is the remainder. This equation can be rewritten as a continued fraction expansion, as follows:3796/1387=2+1022/1387=2+1/(1387/1022).Proceeding in the same manner as above,1387/1022=1+365/1022=1+1/(1022/365).Thus,3796/1387=2+1022/1387=2+1/(1+1/(1022/365)).Proceeding further in the same manner as above yields the following1022=365*2+292365=292*1+73292=73*4.Making the appropriate substitutions in the above continued fraction representation and rewriting the equations without the parentheses yields
                              3796          /          1387                =                  2          +                      1022            /            1387                                                  =                  2          +                      1            /            1                    +                      1            /                          (                              1022                /                365                            )                                                              =                  2          +                      1            /            1                    +                      1            /            2                    +                      1            /                          (                              365                /                292                            )                                                              =                  2          +                      1                          1              +                              1                                  2                  +                                      1                                          1                      +                                              1                        4                                                                                                                                    In list notation, the quotient of 3796/1387 is thus represented as [2, 1, 2, 1, 4].